package com.evildog.workspace.life.application.model;

import com.evildog.workspace.dependencies.mybatis.annotation.QueryCondition;
import com.evildog.workspace.dependencies.mybatis.annotation.QueryTableLogic;
import com.evildog.workspace.dependencies.mybatis.annotation.QueryUserCondition;
import com.evildog.workspace.dependencies.mybatis.enums.ComparisonOperatorsEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * photo列表查询参数，可以使用QueryCondition.class
 * </p>
 *
 * @author evildog
 * @since 2020-08-02
 */
@Data
@Accessors(chain = true)
@ApiModel(value="Photo查询参数/request body")
@QueryTableLogic
@QueryUserCondition
public class PhotoListParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "相册id")
    @QueryCondition
    private Long albumId;

    @ApiModelProperty(value = "星级 1-5 (保存*10)")
    @QueryCondition
    private Integer star;

    @ApiModelProperty(value = "开始时间")
    @QueryCondition( fieldName = "create_time", operator = ComparisonOperatorsEnum.GE)
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @QueryCondition(fieldName = "create_time", operator = ComparisonOperatorsEnum.LE)
    private LocalDateTime endTime;

    @ApiModelProperty(value = "开始星级")
    @QueryCondition(fieldName = "star", operator = ComparisonOperatorsEnum.GE)
    private LocalDateTime startStar;

    @ApiModelProperty(value = "结束星级")
    @QueryCondition( fieldName = "star", operator = ComparisonOperatorsEnum.LE)
    private LocalDateTime endStar;


}
